package com.work.vo.main;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.work.utils.BigDecimalSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.Func;

import java.math.BigDecimal;

/**
 * 货物库存汇总统计-船名VO
 *
 * @author ：dujianyu
 * @since ：Created in 2024/7/4 15:05
 */
@Data
public class StorageByShipVO {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(name = "船ID",notes = "")
    private Long transportShipId ;

    @ApiModelProperty(value = "船名")
    private String shipNameZh;

    @ApiModelProperty(value = "航次")
    private String voyage;

    @ApiModelProperty(value = "进出口")
    private String iE;

    @ApiModelProperty(value = "进出口")
    private String ieName;

    public String getIeName() {
        switch (iE) {
            case "I":
                return "进口";
            case "E":
                return "出口";
            case "CZ":
                return  "存栈";
            default:
                return "";
        }
    }

    @ApiModelProperty(value = "总件数")
    private Integer allPiece;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(value = "总吨数")
    private BigDecimal allTon;

    @ApiModelProperty(value = "总货主数")
    private Integer cargoOwners;

    @ApiModelProperty(value = "总货名数")
    private Integer cargoTypes;
}
